<extend name="Base/common"/>
<block name="style">
<link href="__CSS__/stylesheet.css" rel="stylesheet">
<link href="__CSS__/business.css" rel="stylesheet">
</block>
<block name="header">
<header>
	<include file="User/header" />
</header>
</block>

<block name="body">
<div class="container main">
	<div class="user-main">
		<div class="col-xs-3">
			<include file="Business/left_menu" />
		</div>
		<div class="col-xs-9">
			<h5>订单管理</h5>
			<div class="content">
				<ul class="order-nav">
					<li <empty name="type">class="selected"</empty>><a href="{:U('Business/orders')}">所有订单</a></li>
					<li <eq name="type" value="pending">class="selected"</eq>><a href="{:U('Business/orders',array('type'=>'pending'))}">待付款<em class="num">{$statistics.pending}</em></a></li>
					<li <eq name="type" value="shipping">class="selected"</eq>><a href="{:U('Business/orders',array('type'=>'shipping'))}">待发货<em class="num">{$statistics.shipping}</em></a></li>
					<li <eq name="type" value="receipt">class="selected"</eq>><a href="{:U('Business/orders',array('type'=>'receipt'))}">聚真宝待收货<em class="num">{$statistics.receipt}</em></a></li>
					<li <eq name="type" value="identify">class="selected"</eq>><a href="{:U('Business/orders',array('type'=>'identify'))}">聚真宝正在鉴定<em class="num">{$statistics.identify}</em></a></li>
					<li <eq name="type" value="shipped">class="selected"</eq>><a href="{:U('Business/orders',array('type'=>'shipped'))}">聚真宝已发货<em class="num">{$statistics.shipped}</em></a></li>
					<li <eq name="type" value="evaluate">class="selected"</eq>><a href="{:U('Business/orders',array('type'=>'evaluate'))}">待评价<em class="num">{$statistics.evaluate}</em></a></li>
					<li <eq name="type" value="finish">class="selected"</eq>><a href="{:U('Business/orders',array('type'=>'finish'))}">已完成<em class="num">{$statistics.finish}</em></a></li>
					<li <eq name="type" value="close">class="selected"</eq>><a href="{:U('Business/orders',array('type'=>'close'))}">已关闭<em class="num">{$statistics.close}</em></a></li>
				</ul>
				<div class="order-search">
						<input type="text" name="order_keyword" id="order_keyword" value="{:I('order_keyword')}" placeholder="搜索商品标题或订单号">
						<a href="javascript:;" class="btn search_btn">订单搜索</a>
						<script>
						$(function(){
							$('.search_btn').click(function(){								
							 	var order_keyword=$('#order_keyword').val();							
								location.href ="{:U('orders')}"+'?order_keyword='+order_keyword;
							});
						});
						</script>					
				</div>
				<div class="table-list orders">
					<div class="hd">
						<ul class="table">
							<li>商品信息</li>
							<li>单价</li>
							<li>数量</li>
							<li>实付款</li>
							<li>交易状态</li>
							<li>操作</li>
						</ul>
					</div>
					<div class="bd">
						<ul class="order-list">
							<volist name="order_list" id="volist">
							<li>
								<div class="head">
									<span class="order-no">订单号：{$volist.order_no}</span>
									<span class="order-time">{$volist.create_time|time_format=###,'Y-m-d H:m'}</span>
									<span class="order-s-status">{$volist.seller_status_text}</span>
								</div>
								<ul class="p-list">
								<volist name="volist['products']" id="vo_list_pro" key="key">
									<li>									
										<ul class="table">
											<li>
												<a href="{:U('Product/detail',array('id'=>$vo_list_pro['product_id']))}" class="thumb"><img src="__ROOT__{$vo_list_pro.image_path}"></a>
												<a href="{:U('Product/detail',array('id'=>$vo_list_pro['product_id']))}">{$vo_list_pro.product_title}</a>
											</li>
											<li>￥{$vo_list_pro.unit_price}</li>
											<li>{$vo_list_pro.quantity}</li>											
											<eq value="1" name="key">
												<li>
													<p class="order-sfk"><em class="yen">￥</em><em class="price">{$volist.total_price}</em></p>
													<p class="order-jdf">含保真鉴定服务费：{$volist.identify_price|number_format=###,2}</p>
												</li>
												<li>
												<p class="order-status">{$volist.status_text}</p>
													<p class="order-detail"><a href="{:U('Business/order',array('id'=>$volist['order_id']))}">订单详情</a></p>
												</li>
												<li class="order-action">												
												<eq name="volist['status']" value="1" type="egt">
												<eq name="volist['status']" value="2" type="LT">
													<a href="{:U('Business/shipping',array('orderid'=>$volist['order_id']))}" class="btn">发货</a>
												</eq>
												</eq>
												
												</li>
											</eq>
										</ul>
									</li>
								</volist>
								</ul>
							</li>
							</volist>					
						</ul>
						<div class="page center">{$_page}</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
</block>

<block name="script">
<script type="text/javascript">
highlight_leftnav("{:U('Business/orders')}");
highlight_subnav("{:U('Business/index')}");
</script>
</block>